﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace MOJsdk
{
    public class MojDrivePool : Dictionary<string, string>
    {
        public MojDrivePool() 
        {
            ReloadDrivePool();
        }
        public void ReloadDrivePool()
        {
            string strChar;
            string strDisk;
            Clear();

            var drive = DriveInfo.GetDrives().Where(x => x.IsReady && x.DriveFormat == "NTFS");

            foreach (var v in drive)
            {
                strChar = v.RootDirectory.FullName.Substring(0, 1);
                strDisk = TOOLS.GetDriveID(strChar);
                Add(strDisk, strChar);
            }
        }
    }
}
